package org.parklab.lab.web.client;

import java.io.Serializable;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;


@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class RTCDB implements Serializable {
	private static final long serialVersionUID = 1L;

	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	private Long id;
	
	@Persistent
	private String userKey;
	
	@Persistent
	private String chatKey;
	
	@Persistent
	private String text;
	
	public RTCDB() {}
	
	public RTCDB(String userKey, String chatKey, String text) {
		this.userKey = userKey;
		this.chatKey = chatKey;
		this.text = text;
	}

	
	
	@Override
	public String toString() {
		return "RTCDB(id:" + this.id + ",userKey:" + this.userKey + ",chatKey:" + this.chatKey + ",text:" + this.text +")";
	}

	/**
	 * @return the userKey
	 */
	public String getUserKey() {
		return userKey;
	}

	/**
	 * @param userKey the userKey to set
	 */
	public void setUserKey(String userKey) {
		this.userKey = userKey;
	}

	/**
	 * @return the id
	 */
	/**
	 * @return
	 */
	public Long getId() {
		return id;
	}

	/**
	 * @return the chatKey
	 */
	public String getChatKey() {
		return chatKey;
	}

	/**
	 * @param chatKey the chatKey to set
	 */
	public void setChatKey(String chatKey) {
		this.chatKey = chatKey;
	}

	/**
	 * @return the text
	 */
	public String getText() {
		return text;
	}

	/**
	 * @param text the text to set
	 */
	public void setText(String text) {
		this.text = text;
	}
	
	
}
